package com;

import java.io.*;

import static java.lang.Character.toLowerCase;
import static java.lang.Character.toUpperCase;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YJ
 * Date: 2024-6-23
 * Time: 20:22
 */
public class ToUpperCase2 {
    public static void main(String[] args) throws IOException {
        //创建文件字符输入/输出流
        FileReader in = new FileReader("D:\\storage\\homework\\exercise-6-23\\src\\com\\input.txt");//
        FileWriter out = new FileWriter("D:\\storage\\homework\\exercise-6-23\\src\\com\\output.txt");
        int c;
        //主函数
        while ((c = in.read()) != -1) {
            //看题目问的小写-->大写 还是大写-->小写（toLowerCase）
            out.write(toUpperCase((char)c));
        }
        //关闭流
        in.close();
        out.close();
    }
}
